package com.lanyuan.a.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.lanyuan.a.bean.Button;
import com.lanyuan.a.dao.BaseDao;
import com.lanyuan.a.service.ButtonService;

@Service("buttonService")
public class ButtonServiceImpl implements ButtonService {
	@Resource
	private BaseDao<Button> baseDao;
	@Override
	public List<Button> getButtons(String belongs) {
//		return baseDao.find("from Button b");
		return baseDao.find("from Button b where b.belongs like ?", new Object[]{"%"+belongs+"%"});
	}

}
